using UnityEngine;

public class Trap_Thorn_Controller : MonoBehaviour
{
    public float damageTimer;


    private void Update()
    {
        damageTimer -= Time.deltaTime;
    }

    private void OnTriggerStay2D(Collider2D collision)
    {
        if(damageTimer < 0)
        {
            damageTimer = 2;
            collision.GetComponent<PlayerStats>()?.TakeDamage(5);
        }
    }
}
